build: detect if libiconv is present
authorRoger Pau Monne <roger.pau@entel.upc.edu>
Tue, 20 Dec 2011 07:31:40 +0000 (08:31 +0100)
committerRoger Pau Monne <roger.pau@entel.upc.edu>
Tue, 20 Dec 2011 07:31:40 +0000 (08:31 +0100)
Detect if libiconv is present in the system, since we will have to
link against it when using iconv.

Signed-off-by: Roger Pau Monne <roger.pau@entel.upc.edu>
Committed-by: Ian Jackson <ian.jackson.citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
Config.mk

index 1c229c021f158193f64050af8a545d37ced7d90c..7dcb267baa4b315c0099af41bc2fe14e9ea895e7 100644 (file)
--- a/Config.mk
+++ b/Config.mk
@@ -181,6 +181,11 @@ CHECK_INCLUDES = $(EXTRA_INCLUDES) $(PREPEND_INCLUDES) $(APPEND_INCLUDES)
 EMBEDDED_EXTRA_CFLAGS := -nopie -fno-stack-protector -fno-stack-protector-all
 EMBEDDED_EXTRA_CFLAGS += -fno-exceptions
 
+CONFIG_LIBICONV   := $(shell export OS="`uname -s`"; \
+                       export CHECK_LIB="$(CHECK_LIB)"; \
+                       . $(XEN_ROOT)/tools/check/funcs.sh; \
+                       has_lib libiconv.so && echo 'y' || echo 'n')
+
 # Enable XSM security module (by default, Flask).
 XSM_ENABLE ?= n
 FLASK_ENABLE ?= $(XSM_ENABLE)